package com.example.test.service.zerenlian;

public class AddTwo extends AddBean {


    public AddTwo(AddBean nextAddBean) {
        super(nextAddBean);
    }

    @Override
    public AddBean getNextAddBean() {
        return super.getNextAddBean();
    }

    @Override
    public int addNum(int num) {
        num = num +2;
        return getNextAddBean()==null?num:getNextAddBean().addNum(num);
    }
}
